//
//  HMLabel.m
//  ChongTaiApp
//
//  Created by Mac book on 16/5/19.
//  Copyright © 2016年 ChongTai. All rights reserved.
//

#import "HMLabel.h"

@implementation HMLabel

+ (UILabel *)createLabelWithText:(NSString *)text andTextColor:(UIColor*)textColor andBgColor:(UIColor*)bgcolor andFont:(UIFont *)font andTextAlignment:(NSTextAlignment )textAlignment{

    
    UILabel *label = [[UILabel alloc]init];


    if (text) {
        label.text = text;
    }
    if (textColor) {
        label.textColor = textColor;
    }
    if (bgcolor) {
        label.backgroundColor = bgcolor;
    }
    if (font) {
        [label setFont:font];
    }
    if (textAlignment) {
        label.textAlignment = textAlignment;
    }
    
    
    return label;
}


@end
